@extends('layouts.home')

@section('title', '首页')

@section('header')
    <header class="header">
        <nav class="navbar navbar-default" id="navbar">
            <div class="container">
                <div class="header-topbar hidden-xs link-border">
                    <ul class="site-nav topmenu">
                        <li><a href="/tags">标签云</a></li>
                        <li><a href="/readers" rel="nofollow">读者墙</a></li>
                        <li><a href="/links" rel="nofollow">友情链接</a></li>
                        <ul class="dropdown-menu header-topbar-dropdown-menu">
                            <li><a data-toggle="modal" data-target="#WeChat" rel="nofollow"><i class="fa fa-weixin"></i> 微信</a></li>
                            <li><a href="#" rel="nofollow"><i class="fa fa-weibo"></i> 微博</a></li>
                            <li><a data-toggle="modal" data-target="#areDeveloping" rel="nofollow"><i class="fa fa-rss"></i> RSS</a></li>
                        </ul>
                        </li>
                    </ul>
                    <a data-toggle="modal" data-target="#loginModal" class="login" rel="nofollow">Hi,请登录</a>&nbsp;&nbsp;<a href="javascript:;" class="register" rel="nofollow">我要注册</a>&nbsp;&nbsp;<a href="" rel="nofollow">找回密码</a> </div>
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar" aria-expanded="false"> <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
                    <h1 class="logo hvr-bounce-in"><a href="" title=""><img src="{{ URL::asset('images/logo.png') }}" alt=""></a></h1>
                </div>
                <div class="collapse navbar-collapse" id="header-navbar">
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="/">首页</a></li>
                        <li><a href="category.html">前端技术</a></li>
                        <li><a href="category.html">后端程序</a></li>
                        <li><a href="category.html">操作系统</a></li>
                        <li><a href="category.html">杂七杂八</a></li>
                        <li><a href="category.html">关于我</a></li>
                    </ul>
                    <form class="navbar-form visible-xs" action="/Search" method="post">
                        <div class="input-group">
                            <input type="text" name="keyword" class="form-control" placeholder="请输入关键字" maxlength="20" autocomplete="off">
                            <span class="input-group-btn">
            <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
            </span> </div>
                    </form>
                </div>
            </div>
        </nav>
    </header>
@endsection

@section('content')
    <section class="container container-page">
        <div class="pageside">
            <div class="pagemenus">
                <ul class="pagemenu">
                    <li><a href="/tags">标签云</a></li>
                    <li><a href="/readers">读者墙</a></li>
                    <li><a href="/links">友情链接</a></li>
                </ul>
            </div>
        </div>
        <div class="content">
            <header class="article-header">
                <h1 class="article-title">读者墙</h1>
            </header>
            <div class="readers">
                    @foreach($users as $user)
                    
                        @if ($user->famous_user == '金牌用户')
                        <a class="item-readers item-readers-1" target="_blank" href="" rel="nofollow">
                            <h4>【金牌用户】<small>评论：{{ $user->commentCount($user->id) }}</small></h4>
                            <img class="avatar" height="36" width="36" src="{{ $user->cover }}" alt="">
                            <strong>
                                {{ $user->name }}
                            </strong>
                            {{ $user->friendLink->url ?? config('app.url') }}
                        </a>
                            @elseif ($user->famous_user == '银牌用户')
                        <a class="item-readers item-readers-2" target="_blank" href="" rel="nofollow">
                            <h4>【银牌用户】<small>评论：{{ $user->commentCount($user->id) }}</small></h4>
                            <img class="avatar" height="36" width="36" src="{{ $user->cover }}" alt="">
                            <strong>
                                {{ $user->name }}
                            </strong>
                            {{ $user->friendLink->url ?? config('app.url') }}
                        </a>
                            @elseif ($user->famous_user == '铜牌用户')
                        <a class="item-readers item-readers-3" target="_blank" href="" rel="nofollow">
                            <h4>【铜牌用户】<small>评论：{{ $user->commentCount($user->id) }}</small></h4>
                            <img class="avatar" height="36" width="36" src="{{ $user->cover }}" alt="">
                            <strong>
                                {{ $user->name }}
                            </strong>
                            {{ $user->friendLink->url ?? config('app.url') }}
                        </a>
                            @else
                        <a class="item-readers item-readers-4" target="_blank" href="" rel="nofollow">
                            <h4>【黑铁用户】<small>评论：{{ $user->commentCount($user->id) }}</small></h4>
                            <img class="avatar" height="36" width="36" src="{{ $user->cover }}" alt="">
                            <strong>
                                {{ $user->name }}
                            </strong>
                            {{ $user->friendLink->url ?? config('app.url') }}
                        </a>
                        @endif
                    
                    @endforeach
            </div>
        </div>
    </section>
@endsection

@section('script')
    {{--    js脚本预留位--}}

@endsection
